package cn.cmvideo.springboot.poms.listener;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

public class Listener1002741 implements MessageListener
{
	ExecutorService executor = Executors.newFixedThreadPool(10);

//	private int count = 1;

	@Override
	public void onMessage(Message message)
	{
		try
		{
			System.out.println("1002741，接收线程..." + Thread.currentThread().getName() + "收到的消息是："
					+ ((TextMessage) message).getText());
		} catch (JMSException e)
		{
			e.printStackTrace();
		}
		
		
//		executor.execute(() -> {
//			try
//			{
//				System.out.println("1002741，接收线程..." + Thread.currentThread().getName() + "收到的消息是："
//						+ ((TextMessage) message).getText());
//			} catch (JMSException e)
//			{
//				e.printStackTrace();
//			}
//		});
	}

};